<!doctype html>
<html lang="{{ config('app.locale') }}">
<head>
    @include('layout.head')
    <script src="{{mix('/js/welcome/jquery.SuperSlide.2.1.2.js')}}"></script>
    <script src="{{mix('/js/welcome/scrollbar.js')}}"></script>
    <script src="{{mix('/js/welcome/slider.js')}}"></script>
    <script src="{{mix('/js/welcome/scrollbar.js')}}"></script>
    <script src="{{mix('/js/welcome/slider.js')}}"></script>
    <link rel="stylesheet" href="{{mix('/css/index/welcome.css')}}">
    <link rel="stylesheet" href="{{mix('/css/news/news.css')}}">
</head>
<body>
@include('layout.main_header')
@include('layout.main_header_nav')
    <div class="help-wrap">
        <div class="w1200">
            <div class="w12000" style="color:#fff;position: relative; float: left;">
                <div class="bannner wu-f index_yjfl" style="width: 220px;">
                    <ul>
                        <?php $index = 1; ?>
                        @foreach($data['typelist'] as $item)
                        <li class="tu ban_img0{{$index++}}">
                            <a rel="nofollow" target="_blank" href="{{asset('product/product_classify/'. $item['category_id'])}}">{{$item['name']}}</a>
                            <div style="clear: both;"></div>
                        </li>
                        @endforeach
                    </ul>
                </div>
                <?php $index = 0; ?>
                @foreach($data['typelist'] as $item_list)
                <?php $index++ ?>
                <div class="nav-list scrollBox" id="scrollBox{{$index}}" style="margin-left: 110px;">
                    <!-- 套数据的时候  id后面的数字  请自增1 -->
                    <div id="scrollObj{{$index}}" class="scrollObj">
                        <div class="tit">
                            <a target='_blank' href="{{asset('product/product_classify/'. $item_list['category_id'])}}" rel="nofollow">{{$item_list['name']}}</a>
                        </div>
                        <div class="con f-cb">
                            <div class="left">
                                @foreach($item_list['child_list'] as $child_item)
                                <div class="box f-cb">
                                    <span><a target='_blank' href="{{asset('product/product_list/'.$child_item['category_id'])}}" rel="nofollow">{{$child_item['name']}}</a></span>
                                    <ul>
                                        @foreach($child_item['child_list'] as $item)
                                        <li><a rel="nofollow" target='_blank' href="{{asset('product/product_list/'.$child_item['category_id'].'?tid='.$item['category_id'])}}">{{$item['name']}}</a></li>
                                        @endforeach
                                    </ul>
                                </div>
                                @endforeach
                            </div>
                        </div>
                    </div>
                    <div class="scrollBar" id="scrollBar{{$index}}">
                        <!-- 套数据的时候  id后面的数字  请自增1 -->
                        <div class="scrollBtn" id="scrollBtn{{$index}}"></div>
                    </div>
                </div>
                @endforeach
                <div class="fl left-news-wrap">
                    <div class="left-hotlist">
                        <h4>热销排行</h4>
                        <ul>
                            @foreach($data['hotlist'] as $item)
                            <li>
                                <a href="{{asset('product/info/'. $item['products_id'])}}" class="fl img"><img style="margin-left: 10px;margin-top: 10px;" width="150" height="150" src="{{asset($item['cover_image'])}}" alt="{{$item['name']}}"></a>
                                <div class="fl cont">
                                    <a style="margin-left: -8px;" href="{{asset('product/info/'. $item['products_id'])}}" class="name">{{$item['name']}}</a>
                                    <span style="margin-left: -8px;margin-top: 5px;" class="pri">￥{{$item['auth_price']}}</span>
                                </div>
                            </li>
                            @endforeach
                        </ul>
                    </div>
                </div>
            </div>
            <div class="fr right-news-wrap">
                <div class="wrap">
                    <div class="navbox f-cb">
                        <a class="@if(!$data['type']){{'hover'}}@endif" href="{{asset('news/list?type=0')}}">e井快报</a>
                        <a class="@if($data['type']){{'hover'}}@endif" href="{{asset('news/list?type=1')}}">安防资讯</a>
                    </div>
                    <div class="list">
                        <ul>
                            @foreach($data['news_list'] as $item)
                            <li>
								<span class="name">
									<span class="fl dot"></span>
									<a href="{{asset('news/index/'. $item['article_id'])}}">{{$item['title']}}</a>
								</span>
                                <div class="cont">
                                    <div class="fl word">
                                        <a class="font" href="{{asset('news/index/'. $item['article_id'])}}">{{strip_tags(subHtml(str_replace("&nbsp;", "  ", strip_tags($item['content'])),128))}}</a>
                                        <p class="w-f bot">
                                            <a href="{{asset('news/index/'. $item['article_id'])}}" class="more">[阅读更多]</a>
                                            <span class="date">{{date('Y-m-d H:i', $item['create_time'])}}</span>
                                        </p>
                                    </div>
                                </div>
                            </li>
                            @endforeach
                        </ul>
                        <div class="page">
                            @include('layout.page', ['page' => $data['page']])
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@include('layout.main_footer')

<script type="text/javascript">
    $(function(){
        //bannner图 的轮播
        $('.banner .index_boxyl').each(function () {
            $(this).find('li:last').css('margin-right', '0px')
        })

        $('.tu').mouseenter(function () {
            var index = $(this).index();
            $('.nav-list').css('visibility', 'hidden');
            $('.nav-list').eq(index).css('visibility', 'visible');
            $('.nav-list').css('z-index', '3');
            $(this).addClass('cur').siblings().removeClass('cur');
        })
        $('.nav-list').mouseenter(function (event) {
            $(this).css('visibility', 'visible');
            $('.nav-list').css('z-index', '3');

        });
        $('.nav-list').mouseleave(function () {
            $('.nav-list').css('visibility', 'hidden');
            $('.nav-list').css('z-index', '-1');
        })
        $('.wu-f').mouseleave(function () {
            $('.nav-list').css('visibility', 'hidden');
            $('.nav-list').css('z-index', '-1');
        })

        $('.banner .w1200').mouseleave(function (event) {
            $('.tu').removeClass('cur');
        });
    })
</script>
<script type="text/javascript">
    $(function(){
        //八大类 鼠标浮动过去展示
        new ImitateScroll("scrollBox1", "scrollObj1", "scrollBar1", "scrollBtn1");
        new ImitateScroll("scrollBox2", "scrollObj2", "scrollBar2", "scrollBtn2");
        new ImitateScroll("scrollBox3", "scrollObj3", "scrollBar3", "scrollBtn3");
        new ImitateScroll("scrollBox4", "scrollObj4", "scrollBar4", "scrollBtn4");
        new ImitateScroll("scrollBox5", "scrollObj5", "scrollBar5", "scrollBtn5");
        new ImitateScroll("scrollBox6", "scrollObj6", "scrollBar6", "scrollBtn6");
        new ImitateScroll("scrollBox7", "scrollObj7", "scrollBar7", "scrollBtn7");
        new ImitateScroll("scrollBox8", "scrollObj8", "scrollBar8", "scrollBtn8");
    })
</script>
</body>
</html>
